class Edition < ActiveRecord::Base
  validates_presence_of(:number, :message => "Insira o numero da edicao")
  validates_presence_of(:date, :message => "Insira a data da edicao")
  validates_presence_of(:magazine_id, :message => "Insira a qual revista a edicao pertence")
  validates_uniqueness_of(:number, :message => "Insira outro numero de edicao")
  
  belongs_to :magazine
  has_many :priority_lists
end
